import React, { Component } from 'react'
import './index.css'
import { Carousel, Image } from 'antd';

export default class Banner extends Component {
  render () {
    return (
      <div id="banner">
        <Carousel autoPlay >
          {this.props.bannerList.map(banner => (<div key={banner.bannerId} >
            <Image
              preview={false}
              style={{ borderRadius: '0.2rem' }}
              width="100%"
              src={banner.pic}
            />
          </div>))}
        </Carousel>
      </div>
    )
  }
}
